package com.springdemo.enums;

import com.baomidou.mybatisplus.core.enums.IEnum;
import com.fasterxml.jackson.annotation.JsonValue;

import java.io.Serializable;

public enum  NameEnum implements IEnum<Integer> {

    DIANXIN(1,"电信"),
    LIANTONG(2,"联通");

    private int age;
    // 季节特征
    private String desc;
    NameEnum(final int age,final String desc) {
        this.age = age;
        this.desc = desc;
    }

    @Override
    public Integer getValue() {
        return this.age;
    }

    @JsonValue
    public String getDesc() {
        return this.desc;
    }
}
